import java.util.Scanner;

//给一个不多于5位的正整数，要求：一、求它是几位数，二、逆序打印出各位数字
public class Program24 {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        System.out.print("请输入不多于五位的正整数:");
        String number = console.nextLine();
        int n = number.length();
        System.out.println("它是" + n +"位数");
        for (int i = number.length(); i >0 ; i--) {
            System.out.print(number.substring(i-1,i));
        }
    }
}